package com.skyline.myspider.core;

import java.io.IOException;

import org.apache.log4j.Logger;

import com.skyline.myspider.config.ConfigFailException;
import com.skyline.myspider.config.Configuration;
import com.skyline.myspider.schedule.RelevanceValider;

public class MySpider {

	private static Logger logger = null;
	
	private static String logProperPath="/config/log4j.properties";
	
	private static String configProperPath="/config/myspider.properties";

	
	public static void initial() throws ConfigFailException{
		logger=LoggerUtil.getLogger(MySpider.class, logProperPath);
		Configuration.config(configProperPath, logProperPath);
		RelevanceValider.addKeywords(Configuration.getKeywords());
	}
	/**
	 * @param args
	 * @throws IOException
	 * @throws ConfigFailException 
	 */
	public static void main(String[] args) throws IOException, ConfigFailException {
		initial();
	}

}
